
load('summary_data/tableA10.rda')

tableA10 = trans %>%
  gt() %>%
  tab_header(title = "CES Bottom 90 Distribution of Self-Reported Donors") %>%
  fmt_percent(columns = Obama12:Trump20, decimals = 2)  %>%
  cols_label(
    Demographics = "",
    Obama12 = "Obama '12",
    Romney12 = "Romney '12",
    Clinton16 = "Clinton '16",
    Trump16 = "Trump '16",
    Biden20 = "Biden '16",
    Trump20 = "Trump '20"
  ) %>%
  tab_row_group(label = "Education Within White Donors", rows = 10:11) %>%
  tab_row_group(label = "Education", rows = 8:9) %>%
  tab_row_group(label = "Ethnorace", rows = 3:7) %>%
  tab_row_group(label = "Gender", rows = 1:2) %>%
  as_latex()

as.character(tableA10) %>% write_lines('tables/tableA10.tex')
